#include "PersonalDiary.h"
#include <iostream>

using namespace std;

int main(){
    string date;
    cout << "Enter date (YYYY-MM-DD): " << endl;
    cin >> date;
    cin.ignore();//忽略换行符
    PersonalDiary diary("data_file.txt");
    string entity = diary.showEntity(date);
    if(!entity.empty()){
        cout << date << ":" << entity << endl;
    }
    else{//如果实体内容为空
        cout << "No entry for this date:" << date << endl;//输出无该日期的条目信息
    }
    return 0;
}